<template>
  <div class="app-container">
    <h3>当日订单展示</h3>
    <el-table v-loading="loading" :data="postList" :model="queryParams" style="font-size: 15px;">
      <el-table-column label="id" align="center" prop="flowid" width="40" />
      <el-table-column label="wdr号" align="center" prop="wdr" />
      <el-table-column label="投产车间" align="center" prop="productWorkshop" />
      <el-table-column label="订单编号" align="center" prop="orderNo" />
      <el-table-column label="零件号" align="center" prop="partNo" />
      <el-table-column label="订单描述" align="center" prop="orderDescribe" />
      <el-table-column label="订单数量" align="center" prop="orderNum" />
      <el-table-column label="订单状态" align="center" prop="orderState" />
      <el-table-column label="开始时间" align="center" prop="productTime" width="180" />
      <el-table-column label="结束时间" align="center" prop="endTime" width="180" />
    </el-table>

    <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
  </div>

</template>

<script>
  import {
    ordertoday
  } from "@/api/system/from";

  export default {
    data() {
      return {
        loading: true,
        postList: [],
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          flowid: null,
          wdr: null,
          productWorkshop: null,
          orderNo: null,
          partNo: null,
          orderDescribe: null,
          orderNum: null,
          orderState: null,
          productTime: null,
          endTime: null
        },
        // 表单参数
        queryParams: {},
        total: 1,
      }
    },
    created() {
      this.getList();
    },
    methods: {
      /** 查询岗位列表 */
      getList() {
        this.loading = true;
        ordertoday(this.queryParams).then(response => {
          this.postList = response.rows;
          this.total = response.total;
          this.loading = false;
        });
      },
    }
  }
</script>

<style>
  h3{
    text-align: center;
    font-size: 35px;
    color: #6280c6;
  }
</style>
